package tree;

/**
 * @author dx
 * @version 1.0
 * @date 2022/5/28 9:24
 * @description: 剑指offer 27 二叉树的镜像
 */

public class MirriorTree {

}

class MirroeTree_Solution{
    public TreeNode mirrorTree(TreeNode root){
        if(root == null){
            return null;
        }
        TreeNode left = mirrorTree(root.left);
        TreeNode right = mirrorTree(root.right);
        root.left = right;
        root.right = left;
        return root;
    }
}
